home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DDJMAG
/
DDJ8806.ZIP
/
MAY.ZIP
/
MAY.EXM
Wrap
Text File
|
1980-01-01
|
896b
|
38 lines
Example 1: Source Code Recreation
Source Recreation
Object code Result
abc++ a+b+c
bcdfe+*/= let b=c/d*f+e
gabc+(*cd,,$ let g=sum(a*(b+c),c,d)
Example 2: Transformation Table
typedef struct decomp-row {
char ident
short lex_type;
char *prefix_1;
char *prefix_2;
char *suffix;
} decomp_row;
static decomp_row table[] ={
{`!', UNARY_OP, "-", NIL, NIL},
{`+', BINARY_OP, NIL, "+", NIL},
{`-', BINARY_OP, NIL, "-", NIL},
{`/', BINARY_OP, NIL, "/", NIL},
{`*', BINARY_OP, NIL, "*", NIL},
{`^' BINARY_OP, NIL, "^", NIL],
{`(', UNARY-OP, "(", NIL, ")"},
{`$', UNARY_OP, "sum(",NIL, ")"},
{`=', BINARY_OP, "let ","=", ";"},
{`,', BINARY_OP, NIL, ",", NIL}
};